package xyz.shenmegui.foodcheckserver.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.shenmegui.foodcheckserver.DO.SysConfig;
import xyz.shenmegui.foodcheckserver.mapper.SysConfigMapper;
import xyz.shenmegui.foodcheckserver.service.SysConfigService;

@Service
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements SysConfigService{

    @Autowired
    private SysConfigMapper sysConfigMapper;

    @Override
    public SysConfig getConfig(String name) {
        return sysConfigMapper.selectOne(new QueryWrapper<SysConfig>().eq("config", name));
    }
}
